package org.example.thread;

import java.util.concurrent.Callable;

/*
 *Author:ZouHeng
 *Des:
 *Date:2021-01-04  10:41
 */
public class MyCallable implements Callable {
    @Override
    public Object call() throws Exception {
        int sum = 0;
        for (int i = 1; i < 101; i++) {
            sum += i;
        }
        System.out.println(Thread.currentThread().getName() + " is running: " + sum);
        return sum;
    }
}
